#ifndef MEDIACONFIGURATION_H
#define MEDIACONFIGURATION_H

#include <QtCore>
#include <QtGui>
#include <QDialog>

class MediaSettingForm : public QDialog 
{
	Q_OBJECT

public:
	MediaSettingForm();
	~MediaSettingForm();

	int exec(const int audioQuality, const int audioChannels, const int audioSample, const int videoQuality, const int videoFrameRates, const int vSize, const int bitrate, const int autoBR, const int keyframeshift, const int dropframe, const int fastmode);

private:
	QVBoxLayout *m_vMainLayout;
	QGroupBox *m_audioBox;
	QGroupBox *m_videoBox;
	QPushButton *m_pbCancel;
	QPushButton *m_pbSave;
	QLabel *m_lblAudioChannels;
	QLabel *m_lblAudioSample;
	QLabel *m_lblAudioQuality;
	QLabel *m_lblAudioPercentage;
	QLabel *m_lblVideoQuality;
	QLabel *m_lblVideoPercentage;
	QLabel *m_lblVideoBitRate;
	QLabel *m_lblVideoBitRate_kbps;
	QLabel *m_lblKeyFrameShift;
	QLabel *m_lblVideoResolution;
	QSlider *m_slAudioQuality;
	QSlider *m_slVideoQuality;
	QSlider *m_slVideoBitRate;
	QRadioButton *m_rdMono;
	QRadioButton *m_rdStereo;
	QComboBox *m_cbSample;
	QLabel *m_lblFrameRates;
	QSlider *m_slFrameRate;
	QCheckBox *m_chkDropFrame;
	QCheckBox *m_chkFastMode;
	QLineEdit *m_txtKeyFrameShift;
	QRadioButton *m_radioOriginal;
	QRadioButton *m_radio320x240;
	QRadioButton *m_radio640x480;
	QCheckBox *m_chkAutoBitrate;

	virtual void createInterface();
	void adjustBitRate();

private slots:
	void pbSave_Click();
	void m_chkAutoBitrate_toggled(bool);
	void m_slAudioQuality_valueChanged(int);
	void m_slFrameRate_valueChanged(int);
	void resolution_toggle(bool);

signals:
	void onSaveSettings(const int audioQuality, const int audioChannels, const int audioSample, const int videoQuality, const int videoFrameRates, const int vSize, const int videoBitRate, const int autoBitRate, const int keyframeshift, const int dropframe, const int fastmode);
};

#endif // MEDIACONFIGURATION_H
